<?php
$domConfig = Zend_Registry::get('domConfig');
if(count($this->datos)>0):?>
<table id="table_variables" align="center" class="display">
  <thead>
    <tr>
      <th width="25%">C&oacute;digo</th>
      <th width="50%">Nombre variable</th>
      <th width="25%">Unidad</th>
    </tr>
  </thead>
  <tbody>
	<?php foreach ($this->datos as $key => $value):?>
    <tr>
      <td><?php echo $value["idvariable"];?></td>
      <td><a href="javascript:agregar_variable('expresion','<?php echo $value["idvariable"];?>','<?php echo $value["nombredimension"];?>');" title="Haga clic en el nombre de la dimensi&oacute;n para insertarla en el campo expresi&oacute;n"><?php echo $value["nombredimension"];?></a></td>
	  <td><?php echo "{$value["nombreunidad"]}";?></td>
    </tr>
  <?php  endforeach;?>
  </tbody>
</table>

<script type="text/javascript">
 $(function() {
	$('#table_variables').dataTable({
		"bJQueryUI": true,
		"bAutoWidth": false,
 		"sPaginationType": "full_numbers",
 		"bStateSave": true,
 		"aoColumns": [
 	 		 			{ "sType": "numeric" },
 	 		 			null,
 	 		 			null
 	 		 		 ]
 	 		  		
	});

});
</script>
<?php else:?>
<br/>
<?php echo $this->mensajes("No existen registros");?>
<?php endif;?>
